<template>
  <div class="Son" style="border: 1px solid black;margin: 10px;">
    我是Son组件{{ title }}
    <button @click="changeFn">按钮</button>
  </div>
</template>

<script>
export default {
  name: 'MySon',
  props: ['title'],
  methods: {
    changeFn() {
      //通过emit，向父组件发送消息通知
      this.$emit("changeTitle", "你们好")
    }
  }

}
</script>

<style></style>